<template>
	<view>
		<view> {{msg}} </view>
		<view v-text="msg"></view>
		<view v-html="msg"></view>
		<view @tap="itemEvent(index)" :class="current===index?'red':''" v-for="(item,index) in list" :key="item.id">
			{{item.name}} -- {{item.age}} --- {{index}}
		</view>
		
		<view v-if="score>=90">优秀</view>
		<view v-else-if="score>=80">良好</view>
		<view v-else-if="score>=70">中等</view>
		<view v-else-if="score>=60">及格</view>
		<view v-else>不及格</view>
		
		
		<view v-show="score>=90">优秀</view>
	</view>
</template>

<script>
	export default {
		name:"Index",
		data() {
			return {
				score:9,
				current:0,
				// msg:'hello uni-app'
				msg:'<h1> hello uniapp </h1>',
				list:[
					{id:1,name:'张三',age:18},
					{id:2,name:'李四',age:19},
					{id:3,name:'王五',age:20},
				]
			}
		},
		onLoad() {

		},
		methods: {
			itemEvent(idx){
				this.current = idx
			}
		}
	}
</script>

<style lang="scss" scoped>
	.red{
		color:red;
	}
</style>
